package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.CustomerSeas;
import com.hzncc.flowable_diboot.entity.Customer;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 客户公海 VO定义
* @author MyName
* @version 1.0
* @date 2024-05-15
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class CustomerSeasListVO extends CustomerSeas  {
private static final long serialVersionUID = 1444228669485571195L;
    /**
    * SAP客户编码 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "sn",
        condition = "this.name = id"
     )
    private String sn;

    /**
    * 客户名称 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "name",
        condition = "this.name = id"
     )
    private String nameLabel;

    /**
    * 客户来源 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "source",
        condition = "this.name = id"
     )
    private String source;

    /**
    * 客户级别 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "rank",
        condition = "this.name = id"
     )
    private String rank;

    /**
    * 客户行业 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "business",
        condition = "this.name = id"
     )
    private String business;

    /**
    * 客户标签 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "label",
        condition = "this.name = id"
     )
    private String label;

    /**
    * 最后跟进时间 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "lastFollwUpTime",
        condition = "this.name = id"
     )
    private String lastFollowTime;

    /**
    * 详细地址 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "address",
        condition = "this.name = id"
     )
    private String address;

    /**
    * 负责人 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "principal",
        condition = "this.name = id"
     )
    private String user;

    /**
    * 所属部门 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "orgId",
       condition = "this.name = mdl_customer.id and mdl_customer.dept = id"
     )
    private String dept;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}